package com.xiaotu.config;

import com.xiaotu.filter.UserTokenFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhangxiao
 * @create 2021-01-11 19:59
 */
@Configuration
public class UserTokenFilterConfig {

    @Bean
    public FilterRegistrationBean testFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean(new UserTokenFilter());
        registration.addUrlPatterns("/*");
        registration.setName("userAuthFilter");
        return registration;
    }

}

